<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt'%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<link rel="stylesheet" type="text/css" href='./css/theme.css' />
<link rel="stylesheet" type="text/css" href='./css/form.css' />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><spring:message code="title.login" /></title>
</head>
<SCRIPT language=JavaScript type=text/javascript>

	//test the username element of a form
	function isValidUsername(form){
	if (form.j_username.value == "") {
        alert('Please enter Username.');
        form.j_username.focus();
        return false;
	}
	return true;
	}
	
	//perform a login for the LoginForm
	function doLogin(form) {
    //test username
    if (!isValidUsername(form)) {
        return;
    }
    form.submit();
    }
	</SCRIPT>
<body>
<div><jsp:include flush="true" page="header.jsp"></jsp:include></div>
<form name="LoginForm" method="POST" action="j_spring_security_check">
<div align="center" class="body">
<table>
	<TR>
		<TD id=signIn vAlign=top width="50%" class="TableBigBox" align="left"><SPAN
			class=signinhead><img src='img/login.jpg' alt="" align="top"
			width="20" height="20"> Sign In</SPAN><BR>
		<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
			<TBODY>
				<TR>
					<TD>
					<TABLE border=0 cellSpacing=2 cellPadding=4 width="100%">
						<TBODY>
							<TR>
								<TD height=25 colSpan=2 noWrap><SPAN class=txtnormal>Please
								enter your user name and password.</SPAN></TD>
							</TR>
							<tr>
								<td align=right valign="middle" class="txtnormal">Username&nbsp;&nbsp;</td>
								<td height="27" align=left valign="top" class="txtnormal">
								<input type="text" name="j_username" size="20" maxlength="80"
									value='<c:if test="${not empty param.error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>' /></td>
							</tr>
							<tr>
								<td align=right valign="middle" height="27"><span
									class="txtnormal">Password&nbsp;&nbsp;</span></td>
								<td align=left valign="top" class="txtnormal" height="27">
								<input type="password" name="j_password" value="" size="20"
									maxlength="255"> <a
									href="javascript:doLogin(document.LoginForm);"
									onMouseOver="self.status='Press Go to Sign In'; return true">
								<img src='img/go_button.gif' border=0 alt="Sign In"
									align="middle"> </a></td>
							</tr>

							<tr>
								<td colspan="2" class="invalidcredentials" align="left"><c:if
									test="${not empty param.error}">Your login attempt was not successful, please try again.<br />
																	Reason: <c:out
										value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />.
								</c:if></td>
							</tr>
							<TR>
								<TD height=43 colSpan=2><A class=urllink
									href=<spring:message code="link.forgotpassword" />>Lost
								Password?</A> <BR>
								<A class=urllink
									href=<spring:message code="link.forgotusername" />>Lost
								Username?</A> <BR>
							</TR>
						</TBODY>
					</TABLE>
					</TD>
				</TR>
			</TBODY>
		</TABLE>
		</TD>
		<TD id=signIn vAlign=top width="50%" class="TableBigBox" align="left"><SPAN
			class=signinhead>Why Sign In?</SPAN><BR>
		<TABLE border=0 cellSpacing=2 cellPadding=4 width="100%">
			<TBODY>
				<TR>
					<TD class=txtnormal height=26 vAlign=top colSpan=2>Sign in to
					access your account profile information.</TD>
				</TR>
				<TR>
					<TD>
					<UL class=txtnormal>
						<LI>Upload your documents/CV to our searchable database.</LI>
						<LI>Share or download them from anywhere, anytime.</LI>
					</UL>
					</TD>
				</TR>
				<TR>
					<TD><SPAN class=txtnormal><A class=boldurllink
						href=<spring:message code="link.newuser" />>Create your
					account now.</A></SPAN></TD>
				</TR>
			</TBODY>
		</TABLE>
		</TD>
	</TR>
</table>
</div>
</form>

</body>
</html>